172.22.76.115
172.22.76.116
172.22.76.117


172.22.73.188
172.22.67.120
172.22.70.121

172.22.67.97
172.22.67.98
172.22.67.99
172.22.65.41
172.22.64.82
172.22.65.114

// 卸载nginx
systemctl stop nginx
systemctl disable nginx
rm -rf /etc/systemd/system/nginx.service
systemctl daemon-reload
rm -rf  /usr/bin/nginx
rm -rf /wls/application/nginx
systemctl status nginx

// 卸载docker
systemctl stop docker
systemctl disable docker
rm -rf /wls/application/docker
rm -rf /etc/systemd/system/docker.service
systemctl daemon-reload
rm -rf  /usr/bin/docker*
systemctl status docker


// 卸载etcd全流程
systemctl stop etcd
systemctl disable etcd
rm -rf /etc/systemd/system/etcd.service
systemctl daemon-reload
rm -rf  /usr/bin/etcd*
sed -i '/etcdctl/d' /root/.bashrc
source /root/.bashrc
cat /root/.bashrc
systemctl status etcd

//卸载bash-completion
sed -i '/kubectl completion bash/d' /root/.bashrc


// 卸载apiserver
systemctl stop kube-apiserver
systemctl disable kube-apiserver
rm -rf /etc/systemd/system/kube-apiserver.service
systemctl daemon-reload
rm -rf  /usr/bin/kube-apiserver
rm -rf  /usr/bin/kubectl
sed -i '/KUBECONFIG/d' /root/.bashrc
source /root/.bashrc
cat /root/.bashrc
systemctl status kube-apiserver
etcdctl del --prefix ""
sed -i '/kubectl completion bash/d' /root/.bashrc


// 卸载scheduler
systemctl stop kube-scheduler
systemctl disable kube-scheduler
rm -rf /etc/systemd/system/kube-scheduler.service
systemctl daemon-reload
rm -rf  /usr/bin/kube-scheduler
systemctl status kube-scheduler


// 卸载controller-manager
systemctl stop kube-controller-manager
systemctl disable kube-controller-manager
rm -rf /etc/systemd/system/kube-controller-manager.service
systemctl daemon-reload
rm -rf  /usr/bin/kube-controller-manager
systemctl status kube-controller-manager


// 卸载kubelet
systemctl stop kubelet
systemctl disable kubelet
rm -rf /etc/systemd/system/kubelet.service
systemctl daemon-reload
rm -rf  /usr/bin/kubelet
systemctl status kubelet
rm -rf /etc/cni
df -h |grep kubernetes|awk '{print $6}'|xargs umount

// 卸载kube-proxy
systemctl stop kube-proxy
systemctl disable kube-proxy
rm -rf /etc/systemd/system/kube-proxy.service
systemctl daemon-reload
rm -rf  /usr/bin/kube-proxy
systemctl status kube-proxy


// 删除所有docker容器
docker ps -a |awk '{print $1}'|xargs docker rm --force


rm -rf /wls/kubernetes/
rm -rf /wls/application/kubernetes/

// 卸载keepalived
systemctl disable --now keepalived.service
rm -rf /etc/systemd/system/keepalived.service
rm -rf /wls/keepalived
